Release 10.1A: OpenEdge Development:
ADM Reference
assignFields
Procedure that retrieves the object’s column values from the Web and saves them in the data-source. The AddMode property determines whether the data will be saved to the current record or to a new one.
Location: wbdata.p Parameters: None Notes:
- The DataColumns property defines the contents of the webObject and determines which columns to assign.
- The get–field with the name property as input parameter is used to retrieve the data value.
- This procedure is normally not called directly, but by ProcessWebRequest, which uses the values of the two Web fields MaintOption and AddMode to decide its actions. The web page usually has a set of transaction buttons that all share the name MaintOption. This procedure will be called when this value is submit. The web page will also have a hidden field, AddMode,that serves as a context keeper. This field would have been set to YES by the previous request, if the object now is in add mode.
- If the data-source is a SmartDataObject, all columns (unless the columnReadOnly property returns TRUE) will be passed along with their corresponding values using the SmartDataObject’s submitRow function.
- If the data-source is a database, this procedure starts the actual transaction when validateColumns() returns TRUE. The values retrieved from the Web will be assigned directly to the buffers by assigning the BUFFER–VALUE attribute.
- To create a new record, the AddMode property must be set to TRUE before calling this routine. When the data-source is a SmartDataObject, the SmartDataObject will be set in add mode by a call to the SmartDataObject’s addRow function. The returned RowObject ROWID will be used as the first parameter to the submitRow(). When the data-source is a database, the LockRow() function that is called within the transaction block to upgrade the lock, will create a new record when the AddMode is TRUE.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |